<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="author" content="sonkwl,sonkwl.k.xiong@foxconn.com" />
    <meta name="copyright" content="foxconn.com" />
    <meta name="Description" content="" />
</head>

<body>
    <form id="form">
        <input type="text" id="s_no" value="1">
        <input type="text" id="s_name">
        <img src="image" id="s_dept">
        <button type="button" onclick="CheckForm()">测试form</button>
    </form>
    <script src="model/js/ehr.js"></script>
    <script>
        function CheckForm() {
            var errCode = ehr.UseForm(document.querySelector("#form"));
            if (errCode) {
                alert(errCode);
                return;
            }
            var postData = ehr.CreateJson();
            console.log(postData);
        }
    </script>
</body>

</html>